// ------------------------------------------------------------------------------------------------

#include <windows.h>

#include <IIEP_Def.H>

// ------------------------------------------------------------------------------------------------
// name: Lock()
// desc:
// ------------------------------------------------------------------------------------------------

void IIEP::CMutex::Lock(void)
{
  while (m_bLocked)
  {
    ::Sleep(1);
  }
  
  m_bLocked = true;
}

// ------------------------------------------------------------------------------------------------
// name: Wait()
// desc:
// ------------------------------------------------------------------------------------------------

void IIEP::CMutex::Wait(void)
{
  while (m_bLocked)
  {
    ::Sleep(1);
  }
}

// ------------------------------------------------------------------------------------------------